package cn.wolfcode.rbac.service.system_manage;

import cn.wolfcode.rbac.domain.Department;
import cn.wolfcode.rbac.domain.Employee;
import cn.wolfcode.rbac.query.QueryEm;
import cn.wolfcode.rbac.query.QueryObject;
import cn.wolfcode.rbac.util.PageResult;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * @version 1.0
 * @Author:Cao Zhijian
 * @DATE:2020/12/24 0024 14:39:41
 */
public interface IEmployeeService {

    /**
     * 根据id删除员工
     * @param id
     */
    void delete(Long id);

    /**
     * 新增或更新员工
     * employee有id是为更新
     * employee没有id是新增
     * @param employee
     */
    void saveOrUpdate(Employee employee,Long[] ids);

    /**
     * 查找员工
     * @Author Cao Zhijian
     * @Creed: Talk is cheap,show me the code
     * @Created: 2020/12/24 0024 14:44
     * @param id :
     * @return : cn.wolfcode.rbac.domain.Employee
     */
    Employee get(Long id);

    /**
     * 查找所有员工
     * @Author Cao Zhijian
     * @Creed: Talk is cheap,show me the code
     * @Created: 2020/12/24 0024 14:45
     * @return : java.util.List<cn.wolfcode.rbac.domain.Employee>
     */
    List<Employee> listAll();

    /**
     * 分页相关的方法
     * @Author Cao Zhijian
     * @Creed: Talk is cheap,show me the code
     * @Created: 2020/12/24 0024 21:45
     * @param queryObject :
     * @return : java.util.List<cn.wolfcode.rbac.domain.Employee>
     */
    PageResult query(QueryEm queryEm);

    /**
     * 登录操作
     * @Author Cao Zhijian
     * @Creed: Talk is cheap,show me the code
     * @Created: 2020/12/27 0027 20:25
     * @param username : 账号
     * @param password : 密码
     * @return : void
     */
    void login(String username, String password);
    //-----------------
    void save(Employee var1, Long[] var2);
    List<Department> listAllDepartment();

    List<Employee> selectEmLs(String... var1);
    void batchDelete(Long[] var1);
    void exportXls();

    void importXls(MultipartFile var1) throws IOException, Exception;
}
